<template>
  <div>
    <Tabs name="tab1" v-model="tabIndex">
      <TabPane label="活动计划" name="0" :index="0" tab="tab1">
        <activity-plan :index="tabIndex" @addPlot="addPlot"></activity-plan>
      </TabPane>
      <TabPane label="活动策划" name="1" :index="1" tab="tab1">
        <activity-plot ref="plotTab"></activity-plot>
      </TabPane>
    </Tabs>
  </div>
</template>

<script>
import ActivityPlan from './components/activity-plan/index'
import ActivityPlot from './components/activity-plot/index'

export default {
  components: { ActivityPlot, ActivityPlan },
  data () {
    return {
      tabIndex: ''
    }
  },
  methods: {
    addPlot () {
      this.$refs.plotTab.init()
      this.tabIndex = '1'
    }
  }
}
</script>

<style scoped>

</style>
